//
//  SecondViewController.m
//  多次present控制器
//
//  Created by chenleping on 2018/7/11.
//  Copyright © 2018年 IAPTest. All rights reserved.
//

#import "SecondViewController.h"

#import "ThirdViewController.h"
@interface SecondViewController ()

@end

@implementation SecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor grayColor];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    ThirdViewController * thirdVC = [[ThirdViewController alloc] init];
    
    [self.navigationController pushViewController:thirdVC animated:YES];
    
//     UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:thirdVC];
//    [self presentViewController:nav animated:YES completion:nil];
    
//    [self presentViewController:thirdVC animated:YES completion:nil];
}

@end
